<?php


namespace app\controller\admin\partner;


use app\controller\admin\BaseAdminController;
use app\model\partner\EscortMenuModel;

class GoodsController extends BaseAdminController
{

    function setModel()
    {
        return new EscortMenuModel();
    }

    function setWithModel()
    {
    }

    function setSearch()
    {
        return [
            'like' => ['name', "city_id", 'menu_type'],
            '=' => ['status']
        ];
    }

    function setSort()
    {
        return ['sort' => 'desc', 'id' => 'desc'];
    }

    public function getVerifyCartMenuArr()
    {
        try {
            $arr = $this->setModel()->where('menu_type', 2)->field('id,name')->select();
            return $this->success($arr);
        } catch (\Exception $exception) {
            return $this->error($exception);
        }
    }
}